package routers

import (
	"video/controllers"

	beego "github.com/beego/beego/v2/server/web"
	"github.com/beego/beego/v2/server/web/context"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/hello", &controllers.MainController{}, "get:GetHello")
	beego.Include(&controllers.DemoController{})
	var FilterDemo = func(ctx *context.Context) {
		title := "禁止访问"
		ctx.WriteString(title)
	}
	beego.InsertFilter("/demo/*", beego.BeforeRouter, FilterDemo)
}
